package com.itlaobing.exam.entity;

import java.io.Serializable;
import java.time.*;
import java.util.*;

public class Topic implements Serializable {

    private Integer id; // 对象标识符(对应数据库中的主键)
    private String title; // 题目标题
    private String code; // 题目中可能包含的代码
    private Integer level; // 题目难易程度
    private Integer score; // 建议分数值
    private Integer type; // 题目类型，比如 单选 、多选 、不定向选择
    private LocalDateTime creation; // 题目创建时间

    // 维护从 Topic 到 User 的 多对一 关联关系
    private User author; // 当前题目的作者是谁(即谁出的这个题)

    // 维护从 Topic 到 Option 的 一对多 关联关系
    private List<Option> options; // 当前题目有哪些选项

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public LocalDateTime getCreation() {
        return creation;
    }

    public void setCreation(LocalDateTime creation) {
        this.creation = creation;
    }

    public User getAuthor() {
        return author;
    }

    public void setAuthor(User author) {
        this.author = author;
    }

    public List<Option> getOptions() {
        return options;
    }

    public void setOptions(List<Option> options) {
        this.options = options;
    }
}